<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>

<div id='left'>
	<% 
		UserService userService = UserServiceFactory.getUserService(); 
		User user = userService.getCurrentUser(); 
		
		if(user == null) {
	%>
		<b>Navigation</b>     
		<ul>
			     
			<li>
				<a href="<%= userService.createLoginURL(request.getRequestURI())%>">SignIn</a>
			</li>     
		</ul>
	<%
		}
		else {
	%>
		<b>Navigation</b>     
		<ul>     
			<li><a href='/Home.jsp'>Home</a></li>     
			<li><a href='/jsp/CreateNewLog.jsp'>Create new Log</a></li>     
		</ul>	     
		<hr/>		     
		<ul>  
			<li><a href='/jsp/Account.jsp'>View Account</a></li>     
			<li><a href='/jsp/Logs.jsp'>View Loggs</a></li>     
		</ul>	     
		<hr/>
		<ul>
			<li><a href='<%= userService.createLogoutURL(request.getRequestURI())%>'>Sign Out</a></li>     
			<li><a href='/jsp/Upcoming.jsp'>Upcoming</a></li>  
			<li><a href='/jsp/About.jsp'>About</a></li>
		</ul>
	<%
		}
	%>
</div>